//
//  SINAAskDetailViewController.m
//  sinashebao
//
//  Created by  androidlongs on 2017/12/25.
//  Copyright © 2017年  androidlongs. All rights reserved.
//

#import "SINAAskDetailViewController.h"

@interface SINAAskDetailViewController ()

@end

@implementation SINAAskDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self configNavigationItem];
    
    [self initView];
    
}

-(void) initView{
    UIScrollView *scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, mainW, mainH)];
    
    UIView *contentView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, mainW, 320)];
    [contentView setBackgroundColor:[UIColor whiteColor]];
    
    UIView *itemView1 = [[UIView alloc]initWithFrame:CGRectMake(0, 0, mainW, 45)];
    [itemView1 setBackgroundColor:[UIColor whiteColor]];
    
    
    UILabel *titleLabel1 = [[UILabel alloc]initWithFrame:CGRectMake(14, 0, mainW-30, 44)];
    titleLabel1.text=@"请假人：张飞";
    [titleLabel1 setFont:[UIFont systemFontOfSize:16]];
    [titleLabel1 setTextColor:[UIColor colorWithHexString:@"#2e2e2e"]];
    
    UIView *diviView1 = [[UIView alloc]initWithFrame:CGRectMake(15, 44, mainW-30, 1)];
    [diviView1 setBackgroundColor:[UIColor colorWithHexString:@"#eeeeee"]];
    
    
    [itemView1 addSubview:titleLabel1];
    [itemView1 addSubview:diviView1];
    [contentView addSubview:itemView1];
    
    UIView *itemView2 = [[UIView alloc]initWithFrame:CGRectMake(0, 46, mainW, 45)];
    [itemView2 setBackgroundColor:[UIColor whiteColor]];
    
    
    UILabel *titleLabel2 = [[UILabel alloc]initWithFrame:CGRectMake(14, 0, mainW-30, 44)];
    titleLabel2.text=@"学院：体育学院";
    [titleLabel2 setFont:[UIFont systemFontOfSize:16]];
    [titleLabel2 setTextColor:[UIColor colorWithHexString:@"#2e2e2e"]];
    
    UIView *diviView2 = [[UIView alloc]initWithFrame:CGRectMake(15, 44, mainW-30, 1)];
    [diviView2 setBackgroundColor:[UIColor colorWithHexString:@"#eeeeee"]];
    
    
    [itemView2 addSubview:titleLabel2];
    [itemView2 addSubview:diviView2];
    [contentView addSubview:itemView2];
    
    UIView *itemView3 = [[UIView alloc]initWithFrame:CGRectMake(0, 92, mainW, 45)];
    [itemView3 setBackgroundColor:[UIColor whiteColor]];
    
    
    UILabel *titleLabel3 = [[UILabel alloc]initWithFrame:CGRectMake(14, 0, mainW-30, 44)];
    titleLabel3.text=@"班级：112班";
    [titleLabel3 setFont:[UIFont systemFontOfSize:16]];
    [titleLabel3 setTextColor:[UIColor colorWithHexString:@"#2e2e2e"]];
    
    UIView *diviView3 = [[UIView alloc]initWithFrame:CGRectMake(15, 44, mainW-30, 1)];
    [diviView3 setBackgroundColor:[UIColor colorWithHexString:@"#eeeeee"]];
    
    
    [itemView3 addSubview:titleLabel3];
    [itemView3 addSubview:diviView3];
    [contentView addSubview:itemView3];
    
    UIView *itemView4 = [[UIView alloc]initWithFrame:CGRectMake(0, 138, mainW, 45)];
    [itemView4 setBackgroundColor:[UIColor whiteColor]];
    
    
    UILabel *titleLabel4 = [[UILabel alloc]initWithFrame:CGRectMake(14, 0, mainW-30, 44)];
    titleLabel4.text=@"请假类型：病假";
    [titleLabel4 setFont:[UIFont systemFontOfSize:16]];
    [titleLabel4 setTextColor:[UIColor colorWithHexString:@"#2e2e2e"]];
    
    UIView *diviView4 = [[UIView alloc]initWithFrame:CGRectMake(15, 44, mainW-30, 1)];
    [diviView4 setBackgroundColor:[UIColor colorWithHexString:@"#eeeeee"]];
    
    
    [itemView4 addSubview:titleLabel4];
    [itemView4 addSubview:diviView4];
    [contentView addSubview:itemView4];
    
    UIView *itemView5 = [[UIView alloc]initWithFrame:CGRectMake(0, 184, mainW, 45)];
    [itemView5 setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *titleLabel5 = [[UILabel alloc]initWithFrame:CGRectMake(14, 0, mainW-30, 44)];
    titleLabel5.text=@"开始时间：2017-02-03 12：00";
    [titleLabel5 setFont:[UIFont systemFontOfSize:16]];
    [titleLabel5 setTextColor:[UIColor colorWithHexString:@"#2e2e2e"]];
    
    UIView *diviView5 = [[UIView alloc]initWithFrame:CGRectMake(15, 44, mainW-30, 1)];
    [diviView5 setBackgroundColor:[UIColor colorWithHexString:@"#eeeeee"]];
    
    
    [itemView5 addSubview:titleLabel5];
    [itemView5 addSubview:diviView5];
    [contentView addSubview:itemView5];
    
    
    UIView *itemView6 = [[UIView alloc]initWithFrame:CGRectMake(0, 230, mainW, 45)];
    [itemView6 setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *titleLabel6 = [[UILabel alloc]initWithFrame:CGRectMake(14, 0, mainW-30, 44)];
    titleLabel6.text=@"结束时间：2017-02-03 12：00";
    [titleLabel6 setFont:[UIFont systemFontOfSize:16]];
    [titleLabel6 setTextColor:[UIColor colorWithHexString:@"#2e2e2e"]];
    
    UIView *diviView6 = [[UIView alloc]initWithFrame:CGRectMake(15, 44, mainW-30, 1)];
    [diviView6 setBackgroundColor:[UIColor colorWithHexString:@"#eeeeee"]];
    
    
    [itemView6 addSubview:titleLabel6];
    [itemView6 addSubview:diviView6];
    [contentView addSubview:itemView6];
    
    
    UIView *itemView7 = [[UIView alloc]initWithFrame:CGRectMake(0, 276, mainW, 45)];
    [itemView7 setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *titleLabel7 = [[UILabel alloc]initWithFrame:CGRectMake(14, 0, mainW-30, 44)];
    titleLabel7.text=@"请假事由：无";
    [titleLabel7 setFont:[UIFont systemFontOfSize:16]];
    [titleLabel7 setTextColor:[UIColor colorWithHexString:@"#2e2e2e"]];
    
    UIView *diviView7 = [[UIView alloc]initWithFrame:CGRectMake(15, 44, mainW-30, 1)];
    [diviView7 setBackgroundColor:[UIColor colorWithHexString:@"#eeeeee"]];
    
    
    [itemView7 addSubview:titleLabel7];
    [itemView7 addSubview:diviView7];
    [contentView addSubview:itemView7];
    
    
    UIView *itemView8 = [[UIView alloc]initWithFrame:CGRectMake(0, 278, mainW, 45)];
    [itemView8 setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *titleLabel8 = [[UILabel alloc]initWithFrame:CGRectMake(14, 0, mainW-30, 44)];
    titleLabel8.text=@"附件：无";
    [titleLabel8 setFont:[UIFont systemFontOfSize:16]];
    [titleLabel8 setTextColor:[UIColor colorWithHexString:@"#2e2e2e"]];
    
    UIView *diviView8 = [[UIView alloc]initWithFrame:CGRectMake(15, 44, mainW-30, 1)];
    [diviView8 setBackgroundColor:[UIColor colorWithHexString:@"#eeeeee"]];
    
    
    [itemView8 addSubview:titleLabel8];
    //    [itemView8 addSubview:diviView8];
    [contentView addSubview:itemView8];
    
    
    //------------------------------------------------------
    
    UIView *personView = [[UIView alloc]initWithFrame:CGRectMake(0, 345, mainW, 90)];
    [personView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *personNameLabel= [[UILabel alloc]initWithFrame:CGRectMake(14, 0, mainW-30, 44)];
    personNameLabel.text=@"审批人：";
    [personNameLabel setFont:[UIFont systemFontOfSize:16]];
    [personNameLabel setTextColor:[UIColor colorWithHexString:@"#2e2e2e"]];
    [personView addSubview:personNameLabel];
    
    
    UIImageView *statueImaeView= [[UIImageView alloc]initWithFrame:CGRectMake(15, 52, 15, 15)];
    statueImaeView.image=[UIImage imageNamed:@"ask_no_icon"];
    [personView addSubview:statueImaeView];
    
    UILabel *statueLabel= [[UILabel alloc]initWithFrame:CGRectMake(45, 38, mainW-30, 44)];
    statueLabel.text=@"张三老师*已驳回";
    [statueLabel setFont:[UIFont systemFontOfSize:16]];
    [statueLabel setTextColor:[UIColor colorWithHexString:@"#2e2e2e"]];
    [personView addSubview:statueLabel];
    
    
    UILabel *timeLabel= [[UILabel alloc]initWithFrame:CGRectMake(mainW-215, 38, 200, 44)];
    timeLabel.text=@"一天前";
    timeLabel.textAlignment=NSTextAlignmentRight;
    [timeLabel setFont:[UIFont systemFontOfSize:16]];
    [timeLabel setTextColor:[UIColor colorWithHexString:@"#2e2e2e"]];
    [personView addSubview:timeLabel];
    
    
    
    [scrollView addSubview:contentView];
    [scrollView addSubview:personView];
    [self.view addSubview:scrollView];
    [self.view setBackgroundColor:[UIColor colorWithHexString:@"eeeeee"]];
    scrollView.contentSize=CGSizeMake(mainW, mainH+10);
}
-(void)configNavigationItem{
    self.navigationController.navigationBarHidden = NO;
    [self.view setBackgroundColor:[UIColor colorWithHexString:@"#eeeeee"]];
    self.navigationItem.title=@"审批详情";
    self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0/255 green:198.0/255 blue:174.0/255 alpha:0.8f];
    self.navigationController.navigationBar.translucent = NO;
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:18],
                                                                      NSForegroundColorAttributeName:[UIColor whiteColor]}];
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
